import { stringify } from 'qs';
import request from '@/utils/request';

import webpath from '@/utils/webpath';

export async function deleteByPrimaryKeyForProTabColumnAuth(params = {}) {
    return request(`/${webpath}/web/api/service/protabcolumnauth/delete?${stringify(params)}`);
}


export async function selectByPrimaryKeyForProTabColumnAuth(params = {}) {
    return request(`/${webpath}/web/api/service/protabcolumnauth/get?${stringify(params)}`);
}


export async function insertForProTabColumnAuth(params = {}) {
    return request(`/${webpath}/web/api/service/protabcolumnauth/insert`, {
        method: 'POST',
        data: {
            ...params,
            method: 'insert',
        },
    });
}


export async function updateForProTabColumnAuth(params = {}) {
    return request(`/${webpath}/web/api/service/protabcolumnauth/update`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function deleteByMapForProTabColumnAuth(params = {}) {
    return request(`/${webpath}/web/api/service/protabcolumnauth/deleteByMap`, {
        method: 'POST',
        data: {
            ...params,
            method: 'delete',
        },
    });
}


export async function updateByMapForProTabColumnAuth(params = {}) {
    return request(`/${webpath}/web/api/service/protabcolumnauth/updateByMap`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function getOneForProTabColumnAuth(params = {}) {
    return request(`/${webpath}/web/api/service/protabcolumnauth/getOne`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}



export async function getAllForProTabColumnAuth(params = {}) {
    return request(`/${webpath}/web/api/service/protabcolumnauth/getAll`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}


export async function queryPageForProTabColumnAuth(params = {}) {
    return request(`/${webpath}/web/api/service/protabcolumnauth/queryPage`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}


export async function countForProTabColumnAuth(params = {}) {
    return request(`/${webpath}/web/api/service/protabcolumnauth/count`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}

export async function insertBatchForProTabColumnAuth(params = {}) {
    return request(`/${webpath}/web/api/service/protabcolumnauth/insertBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'insert',
        },
    });
}


export async function deleteBatchForProTabColumnAuth(params = {}) {
    return request(`/${webpath}/web/api/service/protabcolumnauth/deleteBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'delete',
        },
    });
}


export async function updateBatchForProTabColumnAuth(params = {}) {
    return request(`/${webpath}/web/api/service/protabcolumnauth/updateBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}

export async function getPageProTableColumnsByAuthId(params = {}) {
    return request(`/${webpath}/web/api/service/protabcolumnauth/getPageProTableColumnsByAuthId`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}

export async function queryPageForProAuthority(params = {}) {
<<<<<<< HEAD
    return request(`/hrath/web/api/service/proauthority/queryPage`, {
=======
    return request(`/${webpath}/web/api/service/proauthority/queryPage`, {
>>>>>>> d8eca5bfb0c3fdab190e7955baa5788118c6937e
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}

export async function queryPageForProTableColumnChild(params = {}) {
    return request(`/${webpath}/web/api/service/protablecolumns/queryPage`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}

export async function getSelectedProTableColumnByAuthId(params = {}) {
    return request(`/${webpath}/web/api/service/protabcolumnauth/getSelectedProTableColumnsByAuthId`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}


